
#include <iostream>
using namespace std;
namespace CL_FMM {
	namespace bad {
		class Data {
		public:
			Data() { cout << "Constructing Data at " << (void*)this << endl; }
			~Data() { cout << "Destroying Data at " << (void*)this << endl; }
		};

		class C {
			Data* data;
		public:
			C() { data = new Data[2]; }
			~C() { delete data; }
		};
	
	}


	namespace good {
		class Data {
		public:
			Data() { cout << "Constructing Data at " << (void*)this << endl; }
			~Data() { cout << "Destroying Data at " << (void*)this << endl; }
		};
		//...
		int main() {
			C c;
			return 1;
		}

		class C {
			Data* data;
			//...
		public:
			C() { data = new Data[2]; }
			~C() { delete[] data; }
			//...
		};
	}
}